<?php
require_once('config.php');

$id=$_GET['id'];

$sql="select * from userinfo where id='$id'";

$result=mysqli_query($conn,$sql);

$connt=mysqli_fetch_array($result);

// echo json_encode($connt);

$obj=array();

if($connt){
    $obj['code']=1;
    $obj['data']['username']=$connt['username'];
    $obj['data']['password']=$connt['password'];
    $obj['data']['telephone']=$connt['telephone'];
}else{
    $obj['code']=0;
    $obj['msg']='用户数据获取失败';
}
echo json_encode($obj);

?>